
<include file="Public/siteTopbar" />
<include file="Public/header" />
<!--------頭部結束-------------->
<link rel="stylesheet" type="text/css" href="__STATIC__/css/homehtmleaf-demo.css">
<link rel="stylesheet" href="__STATIC__/css/page.css" type="text/css">
<link rel="stylesheet" href="__STATIC__/css/category.css" type="text/css">

<script type="text/javascript" src="__STATIC__/js/jquery.jqzoom.js"></script>
<script src="__PUBLIC__/js/pc_common.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script><!--彈窗js 參考文檔 http://layer.layui.com/-->

<!--------中間內容-------------->
<div id="warpper" class="clearfix">

  <?php if($goods_list){ ?>
<div class="cata_shop_right" id="tracker_category">
 

<!-- 商品列表 -->
<div class="searchbox" id="search_box_list">
  <div class="list clearfix">
    <ul class="left text12" id="order_ul">
      <!--        <li><a class="col7ac " href1="&sort=recommand&asc=0" style="cursor:pointer;">綜合</a></li>-->
      <li> <a class="col7ac  <if condition="$_GET[sort] eq ''">main</if>" href="<?php echo urldecode(U("/Home/Goods/goodsList#search_box_list",$filter_param,''));?>" style="cursor:pointer;"> {$Think.lang.productmr} </a> </li>


      <li> <a class="col7ac  <if condition="$_GET[sort] eq 'sales_sum'">main</if>" href="<?php echo urldecode(U("/Home/Goods/goodsList#search_box_list",array_merge($filter_param,array('sort'=>'sales_sum')),''));?>" style="cursor:pointer;"> {$Think.lang.productxl} </a> </li>

      <if condition="$_GET['sort_asc'] eq 'desc'">
        <li><a class="col7ac  <if condition="$_GET[sort] eq 'shop_price'">main</if>" href="<?php echo urldecode(U("/Home/Goods/goodsList#search_box_list",array_merge($filter_param,array('sort'=>'shop_price','sort_asc'=>'asc')),''));?>" style="cursor:pointer;">{$Think.lang.productjg}<span class="icon-chevron-up "></span></a></li>
      <else />
      <li><a class="col7ac  <if condition="$_GET[sort] eq 'shop_price'">main</if>" href="<?php echo urldecode(U("/Home/Goods/goodsList#search_box_list",array_merge($filter_param,array('sort'=>'shop_price','sort_asc'=>'desc')),''));?>" style="cursor:pointer;">{$Think.lang.productjg}<span class="icon-chevron-down "></span></a></li>
      </if>

      <li><a class="col7ac  <if condition="$_GET[sort] eq 'comment_count'">main</if>" href="<?php echo urldecode(U("/Home/Goods/goodsList#search_box_list",array_merge($filter_param,array('sort'=>'comment_count')),''));?>" style="cursor:pointer;">{$Think.lang.productpl}</a></li>
      <li><a class="col7ac  <if condition="$_GET[sort] eq 'is_new'">main</if>"  href="<?php echo urldecode(U("/Home/Goods/goodsList#search_box_list",array_merge($filter_param,array('sort'=>'is_new')),''));?>" style="cursor:pointer;">{$Think.lang.productxp}</a></li>
    </ul>
    <!-- Page -->
    <div class="right text12" id="pagenavi">
      <div class="all-number">
        <span>{$Think.lang.gong}{$page->totalRows}{$Think.lang.commodity} </span>
      </div>
      <p class="pageArea" data-countPage="1">
        <!--<a class="bg_img1"></a>-->
        <span class="colf22e01 fontT">{$page->nowPage}</span>
        /
        <span class="page_count fontT">{$page->totalPages}</span>
        <!--<a href="" class="bg_img2"></a> </p>-->
    </div>
    <!-- Page End-->
  </div>
  <!-- list -->
</div>
<!-- searchbox -->
<?php } ?>


<div class="container">
  <foreach name="goods_list" item="v" key="k">
	<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12 goods_list_box_s">
        <div class="goods_list_box">
            <a href="{:U('/Home/Goods/goodsInfo',array('id'=>$v[goods_id]))}" ><b><img src="{$v.goods_id|goods_thum_images1=269,269}" title="{$bi,$v[goods_id]|goods_name_shift}"  /></b></a>
            <p ><a href="{:U('/Home/Goods/goodsInfo',array('id'=>$v[goods_id]))}">{$bi,$v[goods_id]|goods_name_shift}</a></p>
        </div>
    </div>
  </foreach>
</div>


  <foreach name="goods_list" item="v" key="k">

    <li <if condition="!($k % 4)">class="item"</if> >


    <div class="listbox clearfix">
      <!-- 圖片 -->
      <div class="listPic">
        <a rel="nofollow" target="_blank" href="{:U('/Home/Goods/goodsInfo',array('id'=>$v[goods_id]))}" >

          <if condition="$v.original_img1 neq ''">
            <img  style="display: block;" src="{$v.goods_id|goods_thum_images1=245,327}" dir="{$v.goods_id|goods_thum_images=245,327}" oldurl='{$v.goods_id|goods_thum_images1=245,327}' class="fn_img_lazy">
            <else />
            <img  style="display: block;" src="{$v.goods_id|goods_thum_images=245,327}" dir=""  oldurl='{$v.goods_id|goods_thum_images=245,327}' class="fn_img_lazy">
          </if>
        </a>
      </div>
      
      
      <div class="clear"></div>
      <!-- 品名 -->
      <div class="listDescript"> <a target="_blank" href="{:U('/Home/Goods/goodsInfo',array('id'=>$v[goods_id]))}" class="text13">{$bi,$v[goods_id]|goods_name_shift}<b>{$v[goods_sn]}</b></a> </div>


      <!-- 價格 -->
      <div class="discountPrice">
        <div class="price-cash">
          <span class="price_list"><if condition="($v[market_price] neq $v[shop_price]) AND ($v[market_price] gt $v[shop_price])" ><em> {$v[goods_id],market_price|get_hl_price}</em> </if>{$v[goods_id],shop_price|get_hl_price} </span>
          <del></del>
          <div class="morebtn_price">

            <if condition='$v.store_count eq 0'>
              <a href="javascript:;" class="morebtn1" style="background-color: #8A8A8A;" >{$Think.lang.outofstock} </a>
              <else/>
              <a href="javascript:;" class="morebtn1"  onClick="javascript:AjaxAddCart({$v[goods_id]},1,0);">{$Think.lang.addshoppingtrolley} </a>
            </if>
            <a href="javascript:;" class="morebtn2" onClick="collect_goods({$v.goods_id});">{$Think.lang.addbookmark} </a>
            <div class="clear"></div>
          </div>
        </div>
      </div>
      <!-- 價格 end-->
    </div>
    </li>


  </foreach>


<div class="clear"></div>

{$page->show()}


<!-- 商品列表 -->
</div>
</div>
<!--------中間內容end-------------->


<!--------footer-開始-------------->
<include file="Public/footer" />
<!--------footer-結束-------------->
<script type="text/javascript">

    //############   產品圖片切換        ###########

    $('.list-scroll-warp').each(function(){
        var _this = this;

        $(_this).children().children().each(function(i,o){
            $(o).mouseover(function(){
                $(o).siblings().removeClass('cur');
                $(o).addClass('cur');
                var img_src = $(o).children().children().attr('data-img');
                //var imgold_src = $(_this).parent().siblings('.listPic').find('a').children().attr('src');
                $(_this).parent().siblings('.listPic').find('a').children().attr('src',img_src);
                //$(_this).parent().siblings('.listPic').find('a').children().attr('oldurl',imgold_src);
            })


        })
    })


</script>
</body>
</html>